home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / vesa.h < prev    next >
Text File  |  1996-01-19  |  4KB  |  102 lines

  1. typedef char CHAR;
  2. typedef short SHORT;
  3.  
  4. unsigned char *VESASource(int offset,int x,int y);
  5. unsigned char *VESADest(int offset,int x,int y);
  6. int VESAmode(int *modelist);        // pointer to modes in order of preference, returns mode
  7. /*
  8. Modes are:
  9. 0x06a 800x600   Graphic 16 (== Vesa 0x102)
  10. 0x100 640x400   Graphic 256
  11. 0x101 640x480   Graphic 256
  12. 0x102 800x600   Graphic 16 (== Mode 0x6a)
  13. 0x103 800x600   Graphic 256
  14. 0x104 1024x768  Graphic 16 
  15. 0x105 1024x768  Graphic 256
  16. 0x106 1280x1024 Graphic 16 
  17. 0x107 1280x1024 Graphic 256
  18. 0x108 80  x 60  Text
  19. 0x109 132 x 25  Text
  20. 0x10A 132 x 43  Text
  21. 0x10B 132 x 50  Text
  22. 0x10C 132 x 60  Text
  23. 0x10D 320x200   Graphic 32K   (1:5:5:5)
  24. 0x10E 320x200   Graphic 64K   (5:6:5)
  25. 0x10F 320x200   Graphic 16.8M (8:8:8)
  26. 0x110 640x480   Graphic 32K   (1:5:5:5)
  27. 0x111 640x480   Graphic 64K   (5:6:5)
  28. 0x112 640x480   Graphic 16.8M (8:8:8)
  29. 0x113 800x600   Graphic 32K   (1:5:5:5)
  30. 0x114 800x600   Graphic 64K   (5:6:5)
  31. 0x115 800x600   Graphic 16.8M (8:8:8)
  32. 0x116 1024x768  Graphic 32K   (1:5:5:5)
  33. 0x117 1024x768  Graphic 64K   (5:6:5)
  34. 0x118 1024x768  Graphic 16.8M (8:8:8)
  35. 0x119 1280x1024 Graphic 32K   (1:5:5:5)
  36. 0x11A 1280x1024 Graphic 64K   (5:6:5)
  37. 0x11B 1280x1024 Graphic 16.8M (8:8:8)
  38.  
  39.  */
  40. int vesastart(int x, int y);    // Set start pixel of display
  41. extern int winrange;
  42. extern int Vbytesperline;
  43. ////////////////////////////////////////////////////////////
  44. //// VESA STRUCTURES
  45. // 
  46. struct VESA_INF
  47.     {                                                                  
  48.     char VESASignature[4];                // 4 signature bytes = "VESA" 
  49.     SHORT VESAVersion;                    // VESA version number
  50.     long *OEMStringPtr;                    // Pointer to OEM string
  51.     CHAR Capabilities[4];                // capabilities of the video environment
  52.     long *VideoModePtr;                    // pointer to supported Super VGA modes
  53.     SHORT TotalMemory;                    // Number of 64kb memory blocks on board
  54.     };
  55.  
  56. struct ModeInfoBlock
  57.     {
  58.     // mandatory information
  59.     SHORT ModeAttributes;        // mode attributes
  60.     CHAR WinAAttributes;        // window A attributes
  61.     CHAR WinBAttributes;        // window B attributes
  62.     short WinGranularity;        // window granularity SHORT
  63.     SHORT WinSize;                // window size
  64.     unsigned short WinASegment;    // window A start segment
  65.     unsigned short WinBSegment;    // window B start segment
  66.     long WinFuncPtr;            // pointer to windor function
  67.     SHORT BytesPerScanLine;        // bytes per scan line
  68.     // formerly optional information (now mandatory)
  69.     SHORT XResolution;            // horizontal resolution
  70.     SHORT YResolution;            // vertical resolution
  71.     CHAR XCharSize;                // character cell width
  72.     CHAR YCharSize;                // character cell height
  73.     CHAR NumberOfPlanes;        // number of memory planes
  74.     CHAR BitsPerPixel;            // bits per pixel
  75.     CHAR NumberOfBanks;            // number of banks
  76.     CHAR MemoryModel;            // memory model type
  77.     CHAR BankSize;                 // bank size in kb
  78.     CHAR NumberOfImagePages;    // number of images
  79.     CHAR Reserved;                 // reserved for page function
  80.     // new Direct Color fields
  81.     CHAR RedMaskSize;            // size of direct color red mask in bits
  82.     CHAR RedFieldPosition;        // bit position of LSB of red mask
  83.     CHAR GreenMaskSize;            // size of direct color green mask in bits
  84.     CHAR GreenFieldPosition;    // bit position of LSB of green mask
  85.     CHAR BlueMaskSize;            // size of direct color blue mask in bits
  86.     CHAR BlueFieldPosition;        // bit position of LSB of blue mask
  87.     CHAR RsvdMaskSize;            // size of direct color reserved mask in bits
  88.     CHAR DirectColorModeInfo;    // Direct Color mode attributes
  89.     };
  90.  
  91.  
  92. #ifndef _vesa_gen
  93. extern struct VESA_INF *vesa_inf;
  94. extern struct ModeInfoBlock *vmode_inf;
  95. #endif
  96.  
  97.  
  98.                                                           //
  99.                                                         ////
  100. ////////////////////////////////////////////////////////////
  101.  
  102.